package com.lms.dao;

public class DBLogin extends DBbase{	
	public static boolean isLogin(String username,String userpwd){
		boolean bLogin = false;
		try {
			openConnection();
			String sql="select * from TB_Manager where LoginName=? and [password]=?";
			pStat = conn.prepareStatement(sql);
			pStat.setString(1, username);
			pStat.setString(2, userpwd);
			rs=pStat.executeQuery();
			if(rs.next()){
				bLogin = true;
			}
			closeConnection();
		} catch (Exception e) {
			// TODO: handle exception
		}
		return bLogin;
	}
}
